

#include <kernel.h>
#include <memory.h>
#include <gdt.h>

int main(struct __grub_mb_info *info){
  
  /* Install the GDT */
  //gdt_install();   // GDT Code crashes the system.

  /* Print a welcome message.                  */
  k_clear_scr();
  k_print("Welcome to freeGSD\n");
  k_print("Using 32-bit protected mode\n");
  k_print("GDT Installed\n");

  /* Print the amount memory we have available */
  char buf[16];

  k_print("Memory (start addr 0x100000): ");

  itos((int) info->mem_upper, buf, 16);
  k_print(buf);
  k_print(" KBytes\n");

  for (;;);
  __memory = info->mem_upper;

  k_print("Initializing kernel memory data structures...\n");
  init_kernel_mem();
  k_print("Welcome to paged mode.\n");

}
